package com.qc.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.qc.dao.BannerDao;
import com.qc.entity.BannerEntity;
import com.qc.service.BannerService;

@Service("bannerService")
public class BannerServiceImpl implements BannerService{

    @Resource(name="bannerDao")
    private BannerDao bannerDao;
    
    @Override
    public int getListBannerCount(String name) {

        return bannerDao.getListBannerCount(name);
    }

    @SuppressWarnings("rawtypes")
    @Override
    public List getAllBanner(String name, int pageNo, int pageSize) {

        return bannerDao.getAllBanner(name, pageNo, pageSize);
    }

    @Override
    public int saveBanner(BannerEntity bannerEntity) {

        return bannerDao.saveBanner(bannerEntity);
    }

    @Override
    public int deleteBannerId(long id) {

        return bannerDao.deleteBannerId(id);
    }

    @Override
    public int updateBannerId(BannerEntity bannerEntity) {

        return bannerDao.updateBannerId(bannerEntity);
    }

    @Override
    public BannerEntity getBannerEntity(String id) {

        return bannerDao.getBannerEntity(id);
    }

}
